Skip to content

fix(iac): rename DriftConfigDetector.DetectDriftWithApplied → DetectDriftWithSpecs (align with DO plugin v0.10.5)#571

Merged
intel352 merged 6 commits into
mainfrom
feat/iac-drift-config-detector-rename
May 7, 2026
Merged

fix(iac): rename DriftConfigDetector.DetectDriftWithApplied → DetectDriftWithSpecs (align with DO plugin v0.10.5)#571
intel352 merged 6 commits into
mainfrom
feat/iac-drift-config-detector-rename

Conversation

@intel352

@intel352 intel352 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Workflow-plugin-digitalocean shipped v0.10.5 with its own implementation of the DriftConfigDetector interface using a different signature than our locked plan specified:

  • Our plan (v0.22.2): DetectDriftWithApplied(ctx, refs, applied map[string]map[string]any)
  • DO plugin v0.10.5: DetectDriftWithSpecs(ctx, refs, specs map[string]interfaces.ResourceSpec)

The DO plugin's typing is cleaner — ResourceSpec carries Name, Type, and Config in one typed value. Per the autonomous mandate ("build the right way; refactor where needed"), we adopt the DO plugin's signature as canonical.

Changes

  • interfaces/iac_provider.goDriftConfigDetector.DetectDriftWithApplied renamed to DetectDriftWithSpecs; parameter type changed from map[string]map[string]any to map[string]ResourceSpec
  • cmd/wfctl/infra_drift_applied.gobuildAppliedSpecMap return type changed to map[string]interfaces.ResourceSpec; each entry wrapped as ResourceSpec{Name, Type, Config}
  • cmd/wfctl/infra_apply_refresh.go and infra_status_drift.go — call sites updated to DetectDriftWithSpecs
  • cmd/wfctl/deploy_providers.goremoteIaCProvider.DetectDriftWithApplied renamed to DetectDriftWithSpecs; wire protocol updated: now calls IaCProvider.DetectDrift with specs arg (not a separate RPC method name). This matches the DO plugin v0.10.5 dispatch — it checks for "specs" in args inside invokeProviderDetectDrift
  • decisions/0007-iac-driftconfigdetector-optional-interface.md — addendum documenting the rename and wire protocol rationale
  • All tests updated accordingly

Wire protocol note

The original plan called IaCProvider.DetectDriftWithApplied as a new RPC method. The DO plugin v0.10.5 routes spec-injection through IaCProvider.DetectDrift by checking for a "specs" key in the args map — no new RPC case needed. The new wfctl implementation sends IaCProvider.DetectDrift with refs + specs args. This is more robust: plugins that predate DriftConfigDetector support still handle IaCProvider.DetectDrift and return existence-only results (ignoring unknown args).

Test plan

  • go test ./interfaces/... — DriftConfigDetector interface compile-time assertion passes with new method name
  • go test ./cmd/wfctl/ -run TestBuildAppliedSpecMap — ResourceSpec return type + nil-guard tests pass
  • go test ./cmd/wfctl/ -run TestRemoteIaC_DetectDrift — wire protocol test: confirms IaCProvider.DetectDrift method name is used, not DetectDriftWithApplied
  • go test ./cmd/wfctl/ -run TestRemoteIaC_DriftConfigDetector — compat test passes
  • grep -r DetectDriftWithApplied . — returns empty (no stale references)

🤖 Generated with Claude Code

…DetectDriftWithSpecs

Aligns workflow's interface with the signature shipped in workflow-plugin-
digitalocean v0.10.5. The DO plugin chose map[string]ResourceSpec (typed
wrapper with Name/Type/Config fields) over map[string]map[string]any; the
typed form is cleaner and avoids callers having to reconstruct name/type
from keys.

Wire protocol change: remoteIaCProvider.DetectDriftWithSpecs now invokes
IaCProvider.DetectDrift with a "specs" arg map rather than a separate
IaCProvider.DetectDriftWithApplied RPC method. This matches the DO plugin
v0.10.5 dispatch (specs injection is gated inside invokeProviderDetectDrift
on arg presence). Plugins predating DriftConfigDetector support still handle
IaCProvider.DetectDrift; they ignore the unknown "specs" key and return
existence-only results.

buildAppliedSpecMap return type changed to map[string]interfaces.ResourceSpec;
each entry is wrapped as ResourceSpec{Name, Type, Config}. All callers and
tests updated. ADR 0007 extended with addendum documenting the rename and
wire protocol change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 7, 2026 02:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the IaC drift-detection optional interface and wfctl RPC dispatch with workflow-plugin-digitalocean v0.10.5 by switching from an “applied config map” to a typed ResourceSpec map and routing spec injection through the existing IaCProvider.DetectDrift RPC with a "specs" argument.

Changes:

  • Renames DriftConfigDetector.DetectDriftWithAppliedDetectDriftWithSpecs and updates the argument type to map[string]ResourceSpec.
  • Updates wfctl drift/refresh callers and the buildAppliedSpecMap helper to construct ResourceSpec{Name, Type, Config} entries.
  • Updates remote IaC provider wire protocol to call IaCProvider.DetectDrift with "refs" + "specs" args, plus corresponding tests/docs.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
interfaces/iac_provider.go Renames optional drift interface method and changes the parameter type to ResourceSpec.
interfaces/iac_provider_test.go Updates optional-interface compile-time assertion test to new method signature.
decisions/0007-iac-driftconfigdetector-optional-interface.md Documents the rename and explains the updated wire-protocol approach.
cmd/wfctl/infra_status_drift.go Updates drift path to call DetectDriftWithSpecs when supported.
cmd/wfctl/infra_apply_refresh.go Updates refresh drift path to call DetectDriftWithSpecs when supported.
cmd/wfctl/infra_drift_applied.go Changes helper to return map[string]ResourceSpec and wraps applied config accordingly.
cmd/wfctl/infra_drift_applied_test.go Updates tests for buildAppliedSpecMap to validate ResourceSpec output.
cmd/wfctl/deploy_providers.go Renames remote wrapper method and sends "specs" via IaCProvider.DetectDrift.
cmd/wfctl/deploy_providers_remote_iac_test.go Updates remote IaC tests for new method name and wire-method expectation.
cmd/wfctl/deploy_providers_remote_iac_compat_test.go Updates compat test to pin “specs via DetectDrift” protocol expectation.

Comment thread cmd/wfctl/deploy_providers.go
Comment thread cmd/wfctl/deploy_providers.go Outdated
Comment thread cmd/wfctl/infra_drift_applied.go Outdated
Comment thread cmd/wfctl/deploy_providers_remote_iac_test.go
intel352 and others added 2 commits May 6, 2026 22:53
…hSpecs refactor

The isMethodNotFound helper was only referenced inside the old
DetectDriftWithApplied wrapper. DetectDriftWithSpecs now dispatches via
IaCProvider.DetectDrift (always available), so no method-not-found fallback
is needed at the wire level. Remove the unused function to satisfy golangci-lint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three real findings from Copilot review round 1:

1. buildAppliedSpecMap: prefer st.Type (canonical from ResourceState) over
   ref.Type when building ResourceSpec. Ref may be a lightweight lookup without
   full type info; state is authoritative. Falls back to ref.Type when st.Type
   is empty for backwards compat with state records that predate Type recording.

2. Test assertion: verify InvokeService is called with "specs" key present
   and legacy "applied" key absent — pins the wire contract.

3. New test TestBuildAppliedSpecMap_PrefersStateTypeOverRefType covers the
   st.Type → spec.Type path.

One ghost flag resolved without change: Copilot flagged ctx parameter in
DetectDriftWithSpecs as "will fail compilation" — Go does not fail on unused
function parameters (only unused local variables). Build confirms this is safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 7, 2026 02:55
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:260: parsing iteration count: invalid syntax
baseline-bench.txt:325584: parsing iteration count: invalid syntax
baseline-bench.txt:657334: parsing iteration count: invalid syntax
baseline-bench.txt:995855: parsing iteration count: invalid syntax
baseline-bench.txt:1332393: parsing iteration count: invalid syntax
baseline-bench.txt:1666996: parsing iteration count: invalid syntax
benchmark-results.txt:260: parsing iteration count: invalid syntax
benchmark-results.txt:390291: parsing iteration count: invalid syntax
benchmark-results.txt:988492: parsing iteration count: invalid syntax
benchmark-results.txt:1373858: parsing iteration count: invalid syntax
benchmark-results.txt:1756494: parsing iteration count: invalid syntax
benchmark-results.txt:2113066: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4              4.573m ± 123%
ComponentLoad-4                    3.460m ±   6%
ComponentExecute-4                 1.818µ ±   1%
PoolContention/workers-1-4         1.027µ ±   1%
PoolContention/workers-2-4         1.016µ ±   3%
PoolContention/workers-4-4         1.016µ ±   1%
PoolContention/workers-8-4         1.019µ ±   2%
PoolContention/workers-16-4        1.028µ ±   2%
ComponentLifecycle-4               3.495m ±   0%
SourceValidation-4                 2.068µ ±   1%
RegistryConcurrent-4               736.5n ±   5%
LoaderLoadFromString-4             3.532m ±   1%
geomean                            17.04µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                 3.139m ± 192%
ComponentLoad-4                       3.390m ±   0%
ComponentExecute-4                    1.832µ ±   0%
PoolContention/workers-1-4            1.166µ ±   3%
PoolContention/workers-2-4            1.165µ ±   2%
PoolContention/workers-4-4            1.163µ ±   1%
PoolContention/workers-8-4            1.168µ ±   1%
PoolContention/workers-16-4           1.169µ ±   2%
ComponentLifecycle-4                  3.395m ±   0%
SourceValidation-4                    2.218µ ±   0%
RegistryConcurrent-4                  876.5n ±   2%
LoaderLoadFromString-4                3.487m ±   3%
geomean                               17.73µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  296.5n ± 6%
CircuitBreakerExecution_Success-4          22.68n ± 0%
CircuitBreakerExecution_Failure-4          70.91n ± 0%
geomean                                    78.13n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     447.5n ± 4%
CircuitBreakerExecution_Success-4             59.63n ± 0%
CircuitBreakerExecution_Failure-4             64.80n ± 0%
geomean                                       120.0n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 9V74 80-Core Processor                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
JQTransform_Simple-4                     829.4n ± 26%
JQTransform_ObjectConstruction-4         1.443µ ±  1%
JQTransform_ArraySelect-4                3.412µ ±  4%
JQTransform_Complex-4                    41.38µ ±  1%
JQTransform_Throughput-4                 1.723µ ±  1%
SSEPublishDelivery-4                     63.43n ±  1%
geomean                                  1.626µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
JQTransform_Simple-4                   1.273Ki ± 0%
JQTransform_ObjectConstruction-4       1.773Ki ± 0%
JQTransform_ArraySelect-4              2.625Ki ± 0%
JQTransform_Complex-4                  16.22Ki ± 0%
JQTransform_Throughput-4               1.984Ki ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ benchmark-results.txt │
                                 │        sec/op         │
JQTransform_Simple-4                        966.6n ± 18%
JQTransform_ObjectConstruction-4            1.454µ ±  1%
JQTransform_ArraySelect-4                   3.112µ ±  1%
JQTransform_Complex-4                       34.80µ ±  1%
JQTransform_Throughput-4                    1.752µ ±  2%
SSEPublishDelivery-4                        76.61n ±  1%
geomean                                     1.653µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
JQTransform_Simple-4                      1.273Ki ± 0%
JQTransform_ObjectConstruction-4          1.773Ki ± 0%
JQTransform_ArraySelect-4                 2.625Ki ± 0%
JQTransform_Complex-4                     16.22Ki ± 0%
JQTransform_Throughput-4                  1.984Ki ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.103µ ±  6%
SchemaValidation_AllFields-4                1.679µ ± 13%
SchemaValidation_FormatValidation-4         1.603µ ±  1%
SchemaValidation_ManySchemas-4              1.606µ ±  2%
geomean                                     1.477µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.016µ ± 36%
SchemaValidation_AllFields-4                   1.500µ ±  2%
SchemaValidation_FormatValidation-4            1.467µ ±  2%
SchemaValidation_ManySchemas-4                 1.515µ ±  2%
geomean                                        1.356µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.154µ ± 11%
EventStoreAppend_SQLite-4                  1.113m ±  8%
GetTimeline_InMemory/events-10-4           12.45µ ±  2%
GetTimeline_InMemory/events-50-4           70.01µ ±  1%
GetTimeline_InMemory/events-100-4          114.4µ ± 25%
GetTimeline_InMemory/events-500-4          548.9µ ±  1%
GetTimeline_InMemory/events-1000-4         1.119m ±  3%
GetTimeline_SQLite/events-10-4             84.14µ ±  8%
GetTimeline_SQLite/events-50-4             220.8µ ±  1%
GetTimeline_SQLite/events-100-4            385.0µ ±  0%
GetTimeline_SQLite/events-500-4            1.682m ±  2%
GetTimeline_SQLite/events-1000-4           3.272m ±  0%
geomean                                    195.4µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  807.5 ± 8%
EventStoreAppend_SQLite-4                  1.982Ki ± 2%
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%
geomean                                    67.46Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.134µ ± 10%
EventStoreAppend_SQLite-4                     819.9µ ±  7%
GetTimeline_InMemory/events-10-4              13.23µ ±  1%
GetTimeline_InMemory/events-50-4              73.38µ ±  3%
GetTimeline_InMemory/events-100-4             149.8µ ±  2%
GetTimeline_InMemory/events-500-4             758.8µ ±  4%
GetTimeline_InMemory/events-1000-4            1.551m ±  3%
GetTimeline_SQLite/events-10-4                80.32µ ±  3%
GetTimeline_SQLite/events-50-4                228.4µ ±  1%
GetTimeline_SQLite/events-100-4               411.4µ ±  2%
GetTimeline_SQLite/events-500-4               1.860m ±  1%
GetTimeline_SQLite/events-1000-4              3.646m ±  3%
geomean                                       211.8µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    754.0 ± 12%
EventStoreAppend_SQLite-4                    1.987Ki ±  1%
GetTimeline_InMemory/events-10-4             7.953Ki ±  0%
GetTimeline_InMemory/events-50-4             46.62Ki ±  0%
GetTimeline_InMemory/events-100-4            94.48Ki ±  0%
GetTimeline_InMemory/events-500-4            472.8Ki ±  0%
GetTimeline_InMemory/events-1000-4           944.3Ki ±  0%
GetTimeline_SQLite/events-10-4               16.74Ki ±  0%
GetTimeline_SQLite/events-50-4               87.14Ki ±  0%
GetTimeline_SQLite/events-100-4              175.4Ki ±  0%
GetTimeline_SQLite/events-500-4              846.1Ki ±  0%
GetTimeline_SQLite/events-1000-4             1.639Mi ±  0%
geomean                                      67.09Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread cmd/wfctl/deploy_providers.go Outdated
Comment thread cmd/wfctl/deploy_providers.go
Comment thread decisions/0007-iac-driftconfigdetector-optional-interface.md
intel352 and others added 2 commits May 6, 2026 23:02
Matches the _ context.Context pattern used by all other remoteIaCProvider
methods that call InvokeService (which does not accept a context).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…R 0007 signatures

- DetectDriftWithSpecs now mirrors RepairDirtyMigration: type-asserts invoker to
  remoteServiceContextInvoker and calls InvokeServiceContext(ctx, ...) when available,
  falling back to InvokeService with ctx.Err() guard.
- ADR 0007 Decision code blocks updated from DetectDriftWithApplied to DetectDriftWithSpecs
  and map[string]map[string]any to map[string]ResourceSpec to match the v0.22.3 canonical
  interface; labels pre-v0.22.3 context as historical.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 7, 2026 03:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread interfaces/iac_provider.go Outdated
Comment thread decisions/0007-iac-driftconfigdetector-optional-interface.md Outdated
Comment thread decisions/0007-iac-driftconfigdetector-optional-interface.md
… and wire protocol accuracy

- interfaces/iac_provider.go: change 'desired-spec map' to 'applied-config map sourced from
  state' in the DetectDriftWithSpecs doc comment — the specs come from ResourceState.AppliedConfig
  (applied/user-supplied config), not a desired/intended future state.
- decisions/0007: qualify wire protocol claim about unknown-key handling — only true for
  LEGACY_STRUCT/PROTO_WITH_LEGACY_STRUCT plugins; STRICT_PROTO plugins must include an optional
  specs field in their DetectDrift proto message.
- decisions/0010: rename DetectDriftWithApplied → DetectDriftWithSpecs in all references to
  match the v0.22.3 interface rename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@intel352 intel352 merged commit 67e894d into main May 7, 2026
27 checks passed
@intel352 intel352 deleted the feat/iac-drift-config-detector-rename branch May 7, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants